﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace IronOne.SalesOne.SalesOneWeb
{
    public class ControlVisibility : System.Web.UI.Page
    {
        protected void ShowLables(bool flag)
        {            
            foreach (Control control in this.Controls)
            {
                if (control is Label)
                {
                    if (control.ID != "LblHeader")
                        control.Visible = flag;
                }
                else if (control is TextBox)
                {
                    control.Visible = !flag;
                }
            }

        }
    }
}
